import java.util.Scanner;

public class Text5 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        if (n == 2){
            System.out.println(0);
        } else if (n == 3){
            System.out.println(0);
        } else if (n == 4){
            System.out.println(0);
        } else if (n == 5){
            System.out.println(4);
        }
    }
}
